using System;
using System.IO;
using System.Windows.Forms;
using System.Text;
using System.Threading;
using iTunesExport.Parser;

namespace iTunesUtil
{
    delegate void ShowProgressDelegate(int value, int max);

    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        /// 
        
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
           
                        
            Application.Run(new MainForm());
        }        
        static public bool BrowseForFolder(Label tb, string title, bool bShowNewFolderButton)
        {
            FolderBrowserDialog fbd = new FolderBrowserDialog();
            fbd.Description = title;
            fbd.ShowNewFolderButton = bShowNewFolderButton;
            fbd.SelectedPath = tb.Text;
            DialogResult result = fbd.ShowDialog();
            if (result == DialogResult.OK)
            {
                tb.Text = fbd.SelectedPath;
                return true;
            }
            return false;
        }
        static public bool BrowseForFolder(TextBox tb, string title, bool bShowNewFolderButton)
        {
            FolderBrowserDialog fbd = new FolderBrowserDialog();
            fbd.Description = title;
            fbd.ShowNewFolderButton = bShowNewFolderButton;
            fbd.SelectedPath = tb.Text;
            DialogResult result = fbd.ShowDialog();
            if (result == DialogResult.OK)
            {
                tb.Text = fbd.SelectedPath;
                return true;
            }
            return false;
        }
    }
}